import 'dart:convert';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:wanxiang_app/bean/normal_entity.dart';
import 'package:wanxiang_app/bean/qa_list_entity.dart';
import '../../widgets/myappbar.dart';
import 'package:get/get.dart';
import 'package:html/parser.dart';
import 'package:flutter_html/flutter_html.dart';

class QAServiceController extends GetxController{

  @override
  void onInit() {
    super.onInit();
  }
  @override
  void onClose() {
    super.onClose();
  }
}


class QADetailPage extends GetView<QAServiceController>  {
  late QAServiceController controller ;
  late BuildContext context ;
  late QaListData info;
  @override
  Widget build(BuildContext context1) {

    Get.lazyPut<QAServiceController>(() => QAServiceController());
    controller = Get.find();
    context = context1;
    info = Get.arguments;
    info.content=info.content.replaceAll('21px', '14px');
    info.content=info.content.replaceAll('29px', '14px');
    info.content= info.content.replaceAll('24px', '14px');
    info.content= info.content.replaceAll('letter-spacing: 0', '');
    info.content= info.content.replaceAll('line-height: 34px', '');
    return GetBuilder<QAServiceController>(
      builder: (_){
        return  Scaffold(
            appBar: MyAppBar(context: context, title: info.title,hasLeading: true,),
            backgroundColor: Colors.white,
            body:_content());
      },
    )
    ;

  }
  Widget _content(){
    return SingleChildScrollView(
        child: Container(
          padding: EdgeInsets.only(left: 20.w,top: 20.h,right: 20.w,bottom: 20.h),
          child: Html(data: info.content,          shrinkWrap: true,
          ) ,
        )
    ) ;
  }









}